﻿using Hidistro.Entities.Commodities;
using Hidistro.SaleSystem.Catalog;
using Hidistro.SaleSystem.Comments;
using Hidistro.UI.Common.Controls;
using Juse.Interface;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Web.UI.WebControls;

namespace Hidistro.UI.SaleSystem.Tags
{
    public class yb_wailian : AscxTemplatedWebControl
    {
        protected override void AttachChildControls()
        {
            BaseInfomation bi = new BaseInfomation();
            Repeater list2 = (Repeater)this.FindControl("list2");

            Dictionary<string, string> dic = new Dictionary<string, string>();
            dic.Add("HasCategoryId", "no");
            IList<JSShop.Model.vw_Hishop_FriendlyLinks> list = new List<JSShop.Model.vw_Hishop_FriendlyLinks>();
            list = bi.GetFriendLinkList(dic);

            if ((list != null) && (list.Count > 0))
            {
                list2.DataSource = list;// CommentBrowser.GetFriendlyLinksIsVisible(100);
                list2.DataBind();
            }
            

        }
        protected override void OnInit(EventArgs e)
        {
            if (this.SkinName == null)
            {
                this.SkinName = "/ascx/tags/Common_GoodsList/yb_wailian.ascx";
            }
            base.OnInit(e);
        }
    }
}